﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Core;

namespace DataAccess
{
    public class InfoDanhSachSinhVienLamDeTai
    {
        public string MSSV { get; set; }
        public string HoTenSV { get; set; }
        public DateTime NgaySinh { get; set; }
        public string GioiTinh { get; set; }
        public string Email { get; set; }
        public float TBCHI { get; set; }
        public int TCTL { get; set; }
        public string MaLop { get; set; }
        public string MaNganh { get; set; }
        public string LamDA_KhoaLuan { get; set; }
        public string TenDT { get; set; }
        public InfoDanhSachSinhVienLamDeTai() { }
        public static List<InfoDanhSachSinhVienLamDeTai> DanhSachSinhVienLamDoAn()
        {
            try
            {
                return CBO.FillCollection<InfoDanhSachSinhVienLamDeTai>(DataProvider.Instance.ExecuteReader("DanhSachSVChonDeTai_DoAn"));
            }
            catch { return new List<InfoDanhSachSinhVienLamDeTai>(); }
        }
        public static List<InfoDanhSachSinhVienLamDeTai> DanhSachSinhVienLamKhoaLuan()
        {
            try
            {
                return CBO.FillCollection<InfoDanhSachSinhVienLamDeTai>(DataProvider.Instance.ExecuteReader("DanhSachSVChonDeTai_KhoaLuan"));
            }
            catch { return new List<InfoDanhSachSinhVienLamDeTai>(); }
        }
        public static int ThongKeDanhSachSinhVienChonDeTaiDoAn()
        {
            object rs = DataProvider.Instance.ExecuteScalar("DanhSachSVChonDeTai_ThongKeSoSinhVienChonDeTaiDoAn");
            return Convert.ToInt32(rs);
        }
        public static int ThongKeDanhSachSinhVienChonDeTaiKhoaLuan()
        {
            object rs = DataProvider.Instance.ExecuteScalar("DanhSachSVChonDeTai_ThongKeSoSinhVienChonDeTaiKhoaLuan");
            return Convert.ToInt32(rs);

        }

    }
}
